package br.edu.ufc.deti.broker.monitoramento;

import java.sql.SQLException;
import java.sql.Statement;

import br.edu.ufc.deti.beans.PerfClusters;
import br.edu.ufc.deti.broker.persistencia.PrsMonitoramento;
import br.edu.ufc.deti.connection.DBConnection;

public class NgcMonitoramento {
	
	public boolean coletaDadosRecursos( PerfClusters perfClusters ){
		DBConnection dbc;
		try {
			dbc = new DBConnection("/home/rafael/workspace/perfclusters/database/perfcluster");
			Statement stmt = dbc.getStm();
			PrsMonitoramento prsBroker = new PrsMonitoramento();
			prsBroker.insereValoresRecursos( stmt, perfClusters.getRecursos() );
		} catch (SQLException e) {
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
		return true;
	}
}
